# 1.编写程序,已知字符串s=‘AbcDeFGhIJ’,计算该字符串中小写字母的数量
lower = 'abcdefghijklmnopqrstuvwxyz'
s = 'AbcDeFGhIJ'
num = 0
for item in lower:
    if s.find(item) != -1:
        num = num + 1
print(num)  # 4

# 2.编写程序,检查字符串‘Life is short. I use python’中是否包含字符串‘python’,若
# 包含则替换为‘Python’后输出新的字符串,否则输出源字符串
s = 'Life is short. I use python'
if s.find('python') != -1:
    s = s.replace('python', "Python")
print(s)  # Life is short. I use Python
